BTRAP
MTRAP
QTRAP

Syntax: BTRAP #ch,key [,d1 [,d2 [,d3 [,a1 [,a2 ]]]]]
   and: MTRAP key [,d1 [,d2 [,d3 [,a0 [,a1 ]]]]]
    or: MTRAP key\jobnr [,d2 [,d3 [,a0 [,a1 ]]]]]
   and: QTRAP #ch,key [,d1 [,d2 [,d3 [,a1 [,a2 ]]]]]
Location: TRAPS (DIY Toolkit Vol T)

BTRAP is QTRAP, except that the address parameters (a1 and a2) are taken to be relative to A6, therefore allowing you to access system calls which need to access the SuperBASIC variables, so that you can for example save and load arrays direct!!

MTRAP is similar, but accesses TRAP #1 calls.  The second variant allows you to pass the job number to be used as a parameter, rather than having to work out the job ID.

QTRAP allows you to access TRAP #3 machine code routines (similar to IO_TRAP).

You will need to pass at least two parameters, the number of the channel to be affected and the operation key to be carried out (this is equivalent to the value of D0).  The other parameters allow you to pass the various register values which may be required by the system calls.  The timeout parameter (D3) defaults to -1.

CROSS-REFERENCE:
See IO_TRAP.
Any return parameters can be read with DATAREG and ADDREG.
